package hibernate.roomSystem;

public class SizeAndFacilities {
	private String name;
	private SizeAndFacilities(String n){
		name=n;
	}
	public String toString(){
		return name;
	}
	private static SizeAndFacilities single=new SizeAndFacilities("SINGLE");
	private static SizeAndFacilities dou=new SizeAndFacilities("DOUBLE");
	private static SizeAndFacilities standard=new SizeAndFacilities("STANDARD");
	private static SizeAndFacilities tsu=new SizeAndFacilities("TSU");
	private static SizeAndFacilities triple=new SizeAndFacilities("TRIPLE");
	private static SizeAndFacilities quad=new SizeAndFacilities("QUAD");
	private static SizeAndFacilities suite=new SizeAndFacilities("SUITE");
	
	public static SizeAndFacilities getInstance(String s){
		if (s.equals("SINGLE"))
			return single;
		else if(s.equals("DOUBLE"))
			return dou;
		else if(s.equals("STANDARD"))
			return standard;
		else if(s.equals("TSU"))
			return tsu;
		else if(s.equals("TRIPLE"))
			return triple;
		else if(s.equals("QUAD"))
			return quad;
		else if(s.equals("SUITE"))
			return suite;
		else 
			throw new java.lang.IllegalArgumentException("no this size and facilities");
		
	}
}
